package com.onpositive.gamemaker.core;

import com.onpositive.gamemaker.objects.IGameObject;
import com.onpositive.gamemaker.objects.IGameObjectMap;

public class GameLevel
{
	protected IGameMap levelMap;
	protected IGameObjectMap gameObjectMap;
	
	public GameLevel(IGameMap levelMap, IGameObjectMap gameObjectMap)
	{
		super();
		this.levelMap = levelMap;
		this.gameObjectMap = gameObjectMap;
	}
	
	/**
	 * @return the levelMap
	 */
	public IGameMap getLevelMap()
	{
		return levelMap;
	}
	/**
	 * @param levelMap the levelMap to set
	 */
	public void setLevelMap(IGameMap levelMap)
	{
		this.levelMap = levelMap;
	}
	/**
	 * @return the gameObjectMap
	 */
	public IGameObjectMap getGameObjectMap()
	{
		return gameObjectMap;
	}
	/**
	 * @param gameObjectMap the gameObjectMap to set
	 */
	public void setGameObjectMap(IGameObjectMap gameObjectMap)
	{
		this.gameObjectMap = gameObjectMap;
	}

	/**
	 * @param x
	 * @param y
	 * @return
	 * @see com.onpositive.gamemaker.core.IGameMap#getCell(int, int)
	 */
	public MapCell getCell(int x, int y)
	{
		return levelMap.getCell(x, y);
	}

	/**
	 * @param x
	 * @param y
	 * @return
	 * @see com.onpositive.gamemaker.objects.IGameObjectMap#getGameObjects(int, int)
	 */
	public IGameObject[] getGameObject(int x, int y)
	{
		return gameObjectMap.getGameObjects(x, y);
	}

	/**
	 * TODO IS IT ALWAYS TRUE
	 * @param x
	 * @param y
	 * @param level
	 * @return
	 * @see com.onpositive.gamemaker.objects.IGameObjectMap#getGameObject(int, int, int)
	 */
	public IGameObject getGameObject(int x, int y, int level)
	{
		return gameObjectMap.getGameObject(x, y, level);
	}

	/**
	 * @return
	 * @see com.onpositive.gamemaker.core.IGameMap#getWidth()
	 */
	public int getWidth()
	{
		return levelMap.getWidth();
	}

	/**
	 * @return
	 * @see com.onpositive.gamemaker.core.IGameMap#getHeight()
	 */
	public int getHeight()
	{
		return levelMap.getHeight();
	}
	
}
